module PhotosHelper
  def photo_image_tag(photo, args = {})
    args[:alt] ||= "#{photo.name}-#{photo.note} #{photo.author.nick_name} 上传于#{time_ago_in_words photo.created_at, false}前"
    args[:title] ||= args[:alt]
    image_tag photo_url(photo,:jpg), args
  end
  
end
